<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,maximum-scale=1.0" />
    <title><#if entity.givingId??>编辑<#else>新增</#if>赠送二维码</title>
    <#include "/view/admin/head.html"/>
    <script type="text/javascript" src="${base}/jstool/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>
    <script type="text/javascript" src="${base}/jstool/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
    <link rel="stylesheet" type="text/css" href="${base}/jstool/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" />
    <script type="text/javascript" src="${base}/jstool/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>
    <script type="text/javascript" src="${base}/jstool/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
    <link rel="stylesheet" type="text/css" href="${base}/jstool/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" />


    <script type="text/javascript" src="${base}/jstool/bootstrap-validator-0.5.3/js/bootstrapValidator.min.js"></script>
    <script type="text/javascript" src="${base}/jstool/bootstrap-validator-0.5.3/lang/zh_CN.min.js"></script>
    <link rel="stylesheet" type="text/css" href="${base}/jstool/bootstrap-validator-0.5.3/css/bootstrapValidator.min.css" />


    <style type="text/css">
        .list-path {
            height: 50px;
            line-height: 50px;
            background-color: #9acfea;
        }

        .table-class {
            width: 90%;
            text-align: center;
            border: 1px solid #afd9ee;
            margin: 0 auto;
            margin-top: 50px;
        }

        table th {
            width: 20%;
            background-color: #d9edf7;
            text-align: right;
        }

        table td {
            width: 20%;
            text-align: left;
        }


    </style>
    <script type="text/javascript">

        $(function(){
            //初始化



                $('#createtime').datetimepicker({language: 'zh-CN' });
                $('#updatetime').datetimepicker({language: 'zh-CN' });







            $('#czjgivingForm').bootstrapValidator({
                message: 'This value is not valid',
                feedbackIcons: {
                    valid: 'glyphicon glyphicon-ok',
                    invalid: 'glyphicon glyphicon-remove',
                    validating: 'glyphicon glyphicon-refresh'
                },
                fields: {











                    
                amount:{
                    message: '输入可赠送数量出错',
                    validators:{
                        notEmpty: {
                            message: '可赠送数量不能为空'
                        },
                        stringLength:{
                            max: 11,
                            message: '可赠送数量不能超过 11个字符'
                        },
                        regexp: {
                            regexp: /^[0-9]+$/,
                                    message:'可赠送数量只能是数字'
                        }
                    }
                }

                    ,
                sendNum:{
                    message: '输入已发数量出错',
                    validators:{
                        notEmpty: {
                            message: '已发数量不能为空'
                        },
                        stringLength:{
                            max: 11,
                            message: '已发数量不能超过 11个字符'
                        },
                        regexp: {
                            regexp: /^[0-9]+$/,
                                    message:'已发数量只能是数字'
                        }
                    }
                }

                    ,
                remain:{
                    message: '输入剩余数量出错',
                    validators:{
                        notEmpty: {
                            message: '剩余数量不能为空'
                        },
                        stringLength:{
                            max: 11,
                            message: '剩余数量不能超过 11个字符'
                        },
                        regexp: {
                            regexp: /^[0-9]+$/,
                                    message:'剩余数量只能是数字'
                        }
                    }
                }


                }
            });


        });

    </script>
</head>
<body>
<#include "/view/admin/listnav.html"/>


<div class="table-class">
    <#include "/view/admin/opermsg.html"/>
    <form id="czjgivingForm" action="${base}/czjgiving/save.do"
     >
    <table class="table table-bordered">

                        <input type="hidden" style="display: none" name="givingId" value="${entity.givingId!}"/>


                <tr>
                <th>活动id</th>
                <td>
                    <div class="form-group">
                        <select id="actId" name="actId"
                                class="form-control selectpicker"   data-live-search="true"
                        >
                            <option value="">请选择活动id</option>
                                    <#list listActId as lv>
                                        <option value="${lv.value!}"
                                        <#if lv.value??&&entity.actId??&&entity.actId == lv.value >
                                            selected="selected"
                                        </#if>
                                            >${lv.name!}</option>
                                    </#list>

                        </select>
                    </div>
                </td>
                

                
                <th>库存奖品id</th>
                <td>
                    <div class="form-group">
                        <select id="awardstockId" name="awardstockId"
                                class="form-control selectpicker"   data-live-search="true"
                        >
                            <option value="">请选择库存奖品id</option>
                                    <#list listAwardstockId as lv>
                                        <option value="${lv.value!}"
                                        <#if lv.value??&&entity.awardstockId??&&entity.awardstockId == lv.value >
                                            selected="selected"
                                        </#if>
                                            >${lv.name!}</option>
                                    </#list>

                        </select>
                    </div>
                </td>
                </tr>

                <tr>
                <th>创建时间</th>
                <td>
                    <input type="text" class="form-control" value="<#if (entity.createtime)?? >${entity.createtime?string('yyyy-MM-dd HH:mm:ss')}</#if>" id="createtime" name="createtime" data-date-format="yyyy-mm-dd hh:ii:ss">
                </td>
                

                
                <th>更新时间</th>
                <td>
                    <input type="text" class="form-control" value="<#if (entity.updatetime)?? >${entity.updatetime?string('yyyy-MM-dd HH:mm:ss')}</#if>" id="updatetime" name="updatetime" data-date-format="yyyy-mm-dd hh:ii:ss">
                </td>
                </tr>

                <tr>
                <th>可赠送数量</th>
                <td>
                    <div class="form-group">
                        <input type="text" class="form-control" id="amount" name="amount" placeholder="请输入可赠送数量" value="${entity.amount!}">
                    </div>
                </td>
                

                
                <th>已发数量</th>
                <td>
                    <div class="form-group">
                        <input type="text" class="form-control" id="sendNum" name="sendNum" placeholder="请输入已发数量" value="${entity.sendNum!}">
                    </div>
                </td>
                </tr>

                <tr>
                <th>剩余数量</th>
                <td>
                    <div class="form-group">
                        <input type="text" class="form-control" id="remain" name="remain" placeholder="请输入剩余数量" value="${entity.remain!}">
                    </div>
                </td>
                

                        <input type="hidden" style="display: none" name="delFlag" value="${entity.delFlag!}"/>



        <tr>
            <td colspan="4" width="100%" style="text-align: center;">
                <input type="submit" class="btn btn-success " value="保存"/>
                <span style="width: 20px;">&nbsp;</span>
                <a class="btn btn-danger " href="javascript:window.history.go(-1)">
                   </span>返回</a>
            </td>
        </tr>

    </table>
</form>




</div>

<script type="text/javascript">

</script>


</body>
</html>
